import {environment} from '../../environments/environment';

const PATH = environment.config.url;
const FILE = PATH + environment.config.filePath; // 文件服务
const BASIC = PATH + environment.config.basicPath; // 基础服务
export const HTTP_URLS = {
  // 基础服务
  getCurrentUser: BASIC + '/current_user', // 获取用户信息
  deleteCurrentToken: BASIC + '/current_token', // 删除token
  updateCurrentUserPassword: BASIC + '/current_user/password', // 修改用户密码
  getSystemInfoByCode: BASIC + '/systems/{systemCode}', // 系统及系统信息
  getSystemMenuList: BASIC + '/system/{systemCode}/menu_list', // 获取菜单信息

  // 文件服务
  getToken: FILE + '/token', // 获取token
  getUserDiskInfo: FILE + '/current_user/disk_info', // 获取当前用户网盘信息
  // 增
  createCurrentUserShare: FILE + '/current_user/share', // 创建当前用户共享
  createCurrentUserFile: FILE + '/current_user/file', // 创建当前用户的文件
  createAppFile: FILE + '/app/{appId}/file', // 创建当前用户的文件
  createCurrentUserSafetyChain: FILE + '/current_user/safety_chain', // 创建当前用户的安全链接
  createCurrentUserFolder: FILE + '/current_user/folder', // 创建当前用户的文件夹
  createCurrentUserFolderFile: FILE + '/current_user/folder_file', // 创建当前用户的文件夹及文件(复制文件夹及文件/保存共享文件夹及文件)
  createCurrentUserFolderZipPackage: FILE + '/current_user/folder/{folderId}/zip_packages', // 创建当前用户目录下的zip文件包
  createCdnUrl: FILE + '/current_user/cdn_url', // 创建当前用户的cdn地址
  // 删
  deleteCurrentUserShare: FILE + '/current_user/share/{shareId}', // 删除当前用户的共享
  deleteCurrentUserSafetyChain: FILE + '/current_user/safety_chain/{safetyChainId}', // 删除当前用户的安全链接
  deleteCurrentUserFolder: FILE + '/current_user/folder/{folderId}', // 删除当前用户的文件夹
  deleteCurrentUserFile: FILE + '/current_user/file/{fileId}', // 删除文件

  // 改
  updateCurrentUserSafetyChain: FILE + '/current_user/safety_chain/{safetyChainId}', // 修改当前用户的安全链接
  updateCurrentUserFolder: FILE + '/current_user/folder/{folderId}', // 修改当前用户的文件夹
  updateCurrentUserFolderFile: FILE + '/current_user/folder_file', // 批量移动文件夹及文件 put
  updateCurrentUserFile: FILE + '/current_user/file/{fileId}', // 修改当前用户的文件

  // 查
  getCurrentUserSharePage: FILE + '/current_user/share_pages/{current}', // 获取当前用户的共享页
  getShareByCode: FILE + '/share/{code}', // 根据共享的code获取共享信息
  getShareFolderSize: FILE + '/share/{shareId}/folder/{folderId}/size', // 获取共享文件夹的大小
  getShareParentFolder: FILE + '/share/{shareId}/folder/{folderId}/parents', // 获取共享的所有父级目录
  getCurrentUserSafetyChainPage: FILE + '/current_user/safety_chain_pages/{current}', // 获取当前用户的安全链接页
  getCurrentUserFolders: FILE + '/current_user/folders', // 查询当前用户的文件夹集合
  getCurrentUserFolderSize: FILE + '/current_user/folder/{folderId}/size', // 获取当前用户文件夹大小
  getCurrentUserParentFolder: FILE + '/current_user/folder/{folderId}/parents', // 获取当前用户的所有父级目录
  getShareFolderFile: FILE + '/share/{shareId}/folder_files', // 查询共享的文件夹及文件
  getCurrentUserFolderFile: FILE + '/current_user/folder_files' // 获取当前用户的文件夹及文件信息

};

